﻿using DBServer.Selenium.Extenium.Path;
using Selenium;

namespace DBServer.Selenium.Extenium.Fixtures
{
    public abstract class SearchFieldFixture<T> : TextFieldFixture <SearchFieldFixture<T>>
        where T : SearchFieldFixture<T>
    {
        protected SearchFieldFixture(ISelenium driver, IPath path) 
            : base(driver, path) { }

        public virtual T Search()
        {
            //SafeExec(Path + ".onTrigger2Click()");
            Driver.RunScript(Path + ".onTrigger2Click()");
            return (T) this;
        }
    }

    public class SearchFieldFixture : SearchFieldFixture<SearchFieldFixture>
    {
        public SearchFieldFixture(ISelenium driver, IPath path) : base(driver, path) { }
    }
}
